<#import "/analysis/function.ftl" as fn>
<@fn.header _title="核对工作情况统计">
<@fn.getStreet />
</@fn.header>
<body>
<@fn.position _value="当前位置 &gt;&gt; 核对业务统计 &gt; 核对工作情况统计" />
<div class="contentDiv">
  <div class="condition">
    <h2>统计条件</h2>
    <form id="listForm" method="post">
	    <table class="tableStyle">
	      <tr>
	        <td width="11%">受理时间段：</td>
	        <td width="22%"><input name="acceptStartTime" type="text" class="btnTxtDate" id="textfield" onClick="WdatePicker()" />
	          至
	          <input name="acceptEndTime" type="text" class="btnTxtDate" id="textfield13" onClick="WdatePicker()" />
	          </td>
	        <td width="10%">所属区县：</td>
	        <td width="24%"><select name="countiesRegionId" class="btnSelect" id="country" onchange="getStreet(this.value)">
	            <option value="">-- 请选择 --</option>
				<#if countryRegionList??>
					<#list countryRegionList as region>
					  <option value="${region.id}">${region.name}</option>
					</#list>
				</#if>
	          </select>
	          </td>
	        <td width="11%">所属街道：</td>
	        <td width="22%"><select name="streetRegionId" class="btnSelect" id="street">
	            <option value="">-- 请选择 --</option>
	          </select></td>
	      </tr>
	    </table>
	    <table class="buttonT">
	      <tr>
	        <td width="10%"><input type="submit" class="button" value="统 计" /></td>
	      </tr>
	    </table>
    </form>
  </div>
  <div class="reasult">
    <h2>统计结果</h2>
    <form id="exportExcel" action="${base}/checkBusinessStat/exportExcel" method="post">
    <table class="gridStyle">
      <tr>
        <th>区县</th>
        <th>街道</th>
        <th>准入标准已核实</th>
        <th>一票否决已审核</th>
        <th>中止核对</th>
        <th>终止核对</th>
        <th>生成差异表</th>
	    <th>生成核对表</th>
        <th>抽查</th>
      </tr>
        <#assign accessStadardsOverStatTotal=0 />
        <#assign firstStatTotal=0 />
        <#assign suspendCheckStatTotal=0 />
        <#assign terminatCheckStatTotal=0 />
        <#assign generateDiffTableStatTotal=0 />
        <#assign generateCheckListStatTotal=0 />
		<#assign secondCheckStatTotal=0 />
      <#list resultList as data>
        <#assign accessStadardsOverStatTotal=accessStadardsOverStatTotal+ data.streetWorkInfoData[0].accessStadardsOverStat />
        <#assign firstStatTotal=firstStatTotal+ data.streetWorkInfoData[0].firstStat />
        <#assign suspendCheckStatTotal=suspendCheckStatTotal+ data.streetWorkInfoData[0].suspendCheckStat />
        <#assign terminatCheckStatTotal=terminatCheckStatTotal+ data.streetWorkInfoData[0].terminatCheckStat />
        <#assign generateDiffTableStatTotal=generateDiffTableStatTotal+ data.streetWorkInfoData[0].generateDiffTableStat />
        <#assign generateCheckListStatTotal=generateCheckListStatTotal+ data.streetWorkInfoData[0].generateCheckListStat />
		<#assign secondCheckStatTotal=secondCheckStatTotal+ data.streetWorkInfoData[0].secondCheckStat />
	      <tr>
	        <td<#if (data.streetWorkInfoData?size>1)> rowspan="${data.streetWorkInfoData?size}"</#if>>${data.countryRegionName}</td>
	        <td>${data.streetWorkInfoData[0].streetRegionName}</td>
	        <td>${data.streetWorkInfoData[0].accessStadardsOverStat}</td>
	        <td>${data.streetWorkInfoData[0].firstStat}</td>
	        <td>${data.streetWorkInfoData[0].suspendCheckStat}</td>
	        <td>${data.streetWorkInfoData[0].terminatCheckStat}</td>
	        <td>${data.streetWorkInfoData[0].generateDiffTableStat}</td>
	        <td>${data.streetWorkInfoData[0].generateCheckListStat}</td>
			<td>${data.streetWorkInfoData[0].secondCheckStat}</td>
	      </tr>
	      <#if (data.streetWorkInfoData?size>1)>
		      <#list data.streetWorkInfoData[1..] as _data>
		        <#assign accessStadardsOverStatTotal=accessStadardsOverStatTotal+ _data.accessStadardsOverStat />
		        <#assign firstStatTotal=firstStatTotal+ _data.firstStat />
		        <#assign suspendCheckStatTotal=suspendCheckStatTotal+ _data.suspendCheckStat />
		        <#assign terminatCheckStatTotal=terminatCheckStatTotal+ _data.terminatCheckStat />
		        <#assign generateDiffTableStatTotal=generateDiffTableStatTotal+ _data.generateDiffTableStat />
		        <#assign generateCheckListStatTotal=generateCheckListStatTotal+ _data.generateCheckListStat />
				<#assign secondCheckStatTotal=secondCheckStatTotal+ _data.secondCheckStat />
			      <tr>
			        <td>${_data.streetRegionName}</td>
			        <td>${_data.accessStadardsOverStat}</td>
			        <td>${_data.firstStat}</td>
			        <td>${_data.suspendCheckStat}</td>
			        <td>${_data.terminatCheckStat}</td>
			        <td>${_data.generateDiffTableStat}</td>
			        <td>${_data.generateCheckListStat}</td>
					<td>${_data.secondCheckStat}</td>
			      </tr>
		      </#list>
	      </#if>
	  </#list>
      <tr>
        <td colspan="2">合计</td>
        <td><input type="hidden" name="accessStadardsOverStatTotal" value='${accessStadardsOverStatTotal}'/>${accessStadardsOverStatTotal}</td>
        <td><input type="hidden" name="firstStatTotal" value='${firstStatTotal}'/>${firstStatTotal}</td>
        <td><input type="hidden" name="suspendCheckStatTotal" value='${suspendCheckStatTotal}'/>${suspendCheckStatTotal}</td>
        <td><input type="hidden" name="terminatCheckStatTotal" value='${terminatCheckStatTotal}'/>${terminatCheckStatTotal}</td>
        <td><input type="hidden" name="generateDiffTableStatTotal" value='${generateDiffTableStatTotal}'/>${generateDiffTableStatTotal}</td>
        <td><input type="hidden" name="generateCheckListStatTotal" value='${generateCheckListStatTotal}'/>${generateCheckListStatTotal}</td>
		<td><input type="hidden" name="secondCheckStatTotal" value='${secondCheckStatTotal}'/>${secondCheckStatTotal}</td>
      </tr>
    </table>
	<table class="buttonT">
      <tr>
        <td width="10%"><input type="submit" class="button" value="导出Excel" /></td>
      </tr>
    </table>
    </form>
  </div>
  <div class="explain">
    <h3>说明：</h3>
    <p>1. 未选择统计条件的情况下，默认登陆用户权限下“开始至今”所有数据的统计。</p>
    <p>2. 统计表可下载（excel)、打印。</p>
  </div>
</div>
</body>
</html>
